#include <gtest/gtest.h>
#include <any>
#include <variant>
#include <logger/logger.h>

class A
{
public:
    int getX()
    { return x; }

    int x;
};

class B: public A
{
};

TEST(test_other, test_any)
{
    A ptr;
    ptr.x = 987;
    std::any value = ptr;
    auto data = std::any_cast<A>(value);
    EASE_INFO("value is: %d", data.getX());
    data.x = 123;
    EASE_INFO("new value: %d", ptr.getX());
}

TEST(test_other, test_point)
{
    A *a = nullptr;
//    EASE_INFO("%d", a->x);
    A *b = std::move(a);
    b = new A();
    EASE_INFO("%d", b->x);
    EASE_INFO("%d", a->x);
}
